// kX Driver / kX Driver Interface / kX Driver Effects Library
// Copyright (c) Eugene Gavrilov, Max Mikhailov, and Hanz, 2002-2004.
// All rights reserved

/*
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

// 10kX microcode
// Patch name: 'everb'

char *everb_copyright="Copyright 1998 E-mu Systems/Creative Technology, Ltd.";
char *everb_engine="EMU10K1_A0";
char *everb_comment="APS Everb, DLLed by Hanz Petrov, Jan 2003";
char *everb_created="Fri Jul 13 12:59:02 2001 ";
char *everb_guid="441a09a8-3d0b-11d6-a4c7-8fae6d701845";

char *everb_name="APS Everb";
int everb_itramsize=2943,everb_xtramsize=62590;

dsp_register_info everb_info[]={
	{ "in0",0x4000,0x7,0xffff,0x0 },
	{ "in1",0x4001,0x7,0xffff,0x0 },
	{ "out0",0x8000,0x8,0xffff,0x0 },
	{ "out1",0x8001,0x8,0xffff,0x0 },
	{ "vol",0x8002,0x1,0xffff,0x2 },		//Gain
	{ "sti8002",0x8003,0x1,0xffff,0xcf5c28f6 },
	{ "sti8003",0x8004,0x1,0xffff,0xe6666667 },
	{ "sti8004",0x8005,0x1,0xffff,0xeccccccd },
	{ "sti8005",0x8006,0x1,0xffff,0xccccccc },
	{ "sti8006",0x8007,0x1,0xffff,0x26666666 },
	{ "sti8007",0x8008,0x1,0xffff,0x27ae147a },
	{ "sti8008",0x8009,0x1,0xffff,0x2ccccccc },
	{ "sti8009",0x800a,0x1,0xffff,0x30a3d70a },
	{ "sti800a",0x800b,0x1,0xffff,0x570a3d70 },
	{ "sti800b",0x800c,0x1,0xffff,0x70418937 },
	{ "dyn800c",0x800d,0x1,0xffff,0x0 },
	{ "dyn800d",0x800e,0x1,0xffff,0x0 },
	{ "dyn800e",0x800f,0x1,0xffff,0x0 },
	{ "dyn800f",0x8010,0x1,0xffff,0x0 },
	{ "dyn8010",0x8011,0x1,0xffff,0xfd2f315b },	//High Freq 1
	{ "dyn8011",0x8012,0x1,0xffff,0x0 },		//Low Freq 1
	{ "dyn8012",0x8013,0x1,0xffff,0x3d2f3159 },	//High Freq 2
	{ "dyn8013",0x8014,0x1,0xffff,0x3fffffff },	//Low Freq 2
	{ "dyn8014",0x8015,0x1,0xffff,0x0 },
	{ "dyn8015",0x8016,0x1,0xffff,0x0 },
	{ "dyn8016",0x8017,0x1,0xffff,0x0 },
	{ "dyn8017",0x8018,0x1,0xffff,0x0 },
	{ "dyn8018",0x8019,0x1,0xffff,0x0 },
	{ "dyn8019",0x801a,0x1,0xffff,0x0 },
	{ "sti_dfsn",0x801b,0x1,0xffff,0x4f1bbcf4 },	//Diffusion
	{ "sti801c",0x801c,0x1,0xffff,0xccccccc },
	{ "sti_decay",0x801d,0x1,0xffff,0x2a06a0bb },	//Decay Time
	{ "dyn801a",0x801e,0x1,0xffff,0x3ffff },	//Early Reflection
	{ "level",0x801f,0x1,0xffff,0x3fffffff },	//Level
	{ "sti8020",0x8020,0x1,0xffff,0x77e28000 },
	{ "tmp8086",0x8021,0x3,0xffff,0x0 },
	{ "tmp8087",0x8022,0x3,0xffff,0x0 },
	{ "tmp8088",0x8023,0x3,0xffff,0x0 },
	{ "tmp8089",0x8024,0x3,0xffff,0x0 },
	{ "tmp808a",0x8025,0x3,0xffff,0x0 },
	{ "tmp808b",0x8026,0x3,0xffff,0x0 },
	{ "tempout0",0x8027,0x3,0xffff,0x0 },
	{ "tempout1",0x8028,0x3,0xffff,0x0 },
	{ "itr8022",0x8029,0x49,0xffff,0x0 },
	{ "&itr8022",0x802a,0xb,0xffff,0x0 },
	{ "itr8038",0x802b,0x29,0xffff,0x9c },
	{ "&itr8038",0x802c,0xb,0xffff,0x9c },
	{ "itr8024",0x802d,0x49,0xffff,0xa3 },
	{ "&itr8024",0x802e,0xb,0xffff,0xa3 },
	{ "itr8048",0x802f,0x29,0xffff,0x14c },
	{ "&itr8048",0x8030,0xb,0xffff,0x14c },
	{ "itr8026",0x8031,0x49,0xffff,0x14d },
	{ "&itr8026",0x8032,0xb,0xffff,0x14d },
	{ "itr802e",0x8033,0x29,0xffff,0x31e },
	{ "&itr802e",0x8034,0xb,0xffff,0x31e },
	{ "itr8030",0x8035,0x29,0xffff,0x565 },
	{ "&itr8030",0x8036,0xb,0xffff,0x565 },
	{ "itr8032",0x8037,0x29,0xffff,0x566 },
	{ "&itr8032",0x8038,0xb,0xffff,0x566 },
	{ "itr8034",0x8039,0x29,0xffff,0x5fd },
	{ "&itr8034",0x803a,0xb,0xffff,0x5fd },
	{ "itr8036",0x803b,0x29,0xffff,0x5fe },
	{ "&itr8036",0x803c,0xb,0xffff,0x5fe },
	{ "itr8028",0x803d,0x49,0xffff,0x62d },
	{ "&itr8028",0x803e,0xb,0xffff,0x62d },
	{ "itr803e",0x803f,0x29,0xffff,0x7d6 },
	{ "&itr803e",0x8040,0xb,0xffff,0x7d6 },
	{ "itr8040",0x8041,0x29,0xffff,0xa71 },
	{ "&itr8040",0x8042,0xb,0xffff,0xa71 },
	{ "itr8042",0x8043,0x29,0xffff,0xa72 },
	{ "&itr8042",0x8044,0xb,0xffff,0xa72 },
	{ "itr8044",0x8045,0x29,0xffff,0xaad },
	{ "&itr8044",0x8046,0xb,0xffff,0xaad },
	{ "itr8046",0x8047,0x29,0xffff,0xaae },
	{ "&itr8046",0x8048,0xb,0xffff,0xaae },
	{ "itr802a",0x8049,0x49,0xffff,0xadd },
	{ "&itr802a",0x804a,0xb,0xffff,0xadd },
	{ "itr803a",0x804b,0x29,0xffff,0xb7e },
	{ "&itr803a",0x804c,0xb,0xffff,0xb7e },
	{ "itr803c",0x804d,0x29,0xffff,0xb7d },
	{ "&itr803c",0x804e,0xb,0xffff,0xb7d },
	{ "itr802c",0x804f,0x49,0xffff,0xb2e },
	{ "&itr802c",0x8050,0xb,0xffff,0xb2e },
	{ "itr804a",0x8051,0x29,0xffff,0xb2d },
	{ "&itr804a",0x8052,0xb,0xffff,0xb2d },
	{ "itr804c",0x8053,0x29,0xffff,0xb2c },
	{ "&itr804c",0x8054,0xb,0xffff,0xb2c },
	{ "xtr804e",0x8055,0x4a,0xffff,0x0 },
	{ "&xtr804e",0x8056,0xb,0xffff,0x0 },
	{ "xtr8050",0x8057,0x4a,0xffff,0xca0 },
	{ "&xtr8050",0x8058,0xb,0xffff,0xca0 },
	{ "xtr8052",0x8059,0x4a,0xffff,0x19c4 },
	{ "&xtr8052",0x805a,0xb,0xffff,0x19c4 },
	{ "xtr8054",0x805b,0x4a,0xffff,0x23ee },
	{ "&xtr8054",0x805c,0xb,0xffff,0x23ee },
	{ "xtr8056",0x805d,0x4a,0xffff,0x2d17 },
	{ "&xtr8056",0x805e,0xb,0xffff,0x2d17 },
	{ "xtr8058",0x805f,0x4a,0xffff,0x333b },
	{ "&xtr8058",0x8060,0xb,0xffff,0x333b },
	{ "xtr805a",0x8061,0x4a,0xffff,0x3807 },
	{ "&xtr805a",0x8062,0xb,0xffff,0x3807 },
	{ "xtr805c",0x8063,0x4a,0xffff,0x4627 },
	{ "&xtr805c",0x8064,0xb,0xffff,0x4627 },
	{ "xtr805e",0x8065,0x4a,0xffff,0x51e5 },
	{ "&xtr805e",0x8066,0xb,0xffff,0x51e5 },
	{ "xtr8060",0x8067,0x4a,0xffff,0x5d44 },
	{ "&xtr8060",0x8068,0xb,0xffff,0x5d44 },
	{ "xtr8062",0x8069,0x4a,0xffff,0x6574 },
	{ "&xtr8062",0x806a,0xb,0xffff,0x6574 },
	{ "xtr8064",0x806b,0x4a,0xffff,0x6c52 },
	{ "&xtr8064",0x806c,0xb,0xffff,0x6c52 },
	{ "xtr8066",0x806d,0x4a,0xffff,0x711e },//_R_PREDELAY_LW
	{ "&xtr8066",0x806e,0xb,0xffff,0x711e },
	{ "xtr8068",0x806f,0x4a,0xffff,0xb2ce },//_R_PREDELAY_RW
	{ "&xtr8068",0x8070,0xb,0xffff,0xb2ce },
	{ "xtr806a",0x8071,0x2a,0xffff,0x7a7e },//_R_PREDELAY_LR
	{ "&xtr806a",0x8072,0xb,0xffff,0x7a7e },
	{ "xtr806c",0x8073,0x2a,0xffff,0xbc2e },//_R_PREDELAY_RR
	{ "&xtr806c",0x8074,0xb,0xffff,0xbc2e },
	{ "xtr806e",0x8075,0x2a,0xffff,0x3806 },
	{ "&xtr806e",0x8076,0xb,0xffff,0x3806 },
	{ "xtr8070",0x8077,0x2a,0xffff,0x333a },
	{ "&xtr8070",0x8078,0xb,0xffff,0x333a },
	{ "xtr8072",0x8079,0x2a,0xffff,0x2d16 },
	{ "&xtr8072",0x807a,0xb,0xffff,0x2d16 },
	{ "xtr8074",0x807b,0x2a,0xffff,0x23ed },
	{ "&xtr8074",0x807c,0xb,0xffff,0x23ed },
	{ "xtr8076",0x807d,0x2a,0xffff,0x19c3 },
	{ "&xtr8076",0x807e,0xb,0xffff,0x19c3 },
	{ "xtr8078",0x807f,0x2a,0xffff,0xc9f },
	{ "&xtr8078",0x8080,0xb,0xffff,0xc9f },
	{ "xtr807a",0x8081,0x2a,0xffff,0x711d },
	{ "&xtr807a",0x8082,0xb,0xffff,0x711d },
	{ "xtr807c",0x8083,0x2a,0xffff,0x6c51 },
	{ "&xtr807c",0x8084,0xb,0xffff,0x6c51 },
	{ "xtr807e",0x8085,0x2a,0xffff,0x6573 },
	{ "&xtr807e",0x8086,0xb,0xffff,0x6573 },
	{ "xtr8080",0x8087,0x2a,0xffff,0x5d43 },
	{ "&xtr8080",0x8088,0xb,0xffff,0x5d43 },
	{ "xtr8082",0x8089,0x2a,0xffff,0x51e4 },
	{ "&xtr8082",0x808a,0xb,0xffff,0x51e4 },
	{ "xtr8084",0x808b,0x2a,0xffff,0x4626 },
	{ "&xtr8084",0x808c,0xb,0xffff,0x4626 },
};

dsp_code everb_code[]={
	{ 0x0,0x8023,0x4000,0x2040,0x2040 },
	{ 0x0,0x8031,0x8023,0x2040,0x2040 },
	{ 0x0,0x8021,0x2040,0x8033,0x800b },
	{ 0x1,0x8021,0x8021,0x8035,0x8008 },
	{ 0x1,0x8021,0x8021,0x8037,0x8008 },
	{ 0x1,0x8021,0x8021,0x8039,0x204c },
	{ 0x1,0x8021,0x8021,0x803b,0x204c },
	{ 0xe,0x8019,0x8021,0x2054,0x8019 },
	{ 0x0,0x8025,0x802b,0x8021,0x2053 },
	{ 0x1,0x8029,0x8021,0x8025,0x2053 },
	{ 0xe,0x8021,0x804b,0x204d,0x804d },
	{ 0x0,0x8049,0x8025,0x2040,0x2040 },
	{ 0x0,0x8025,0x8021,0x8025,0x204e },
	{ 0x1,0x8022,0x8025,0x800f,0x801d },
	{ 0x1,0x8022,0x8023,0x800f,0x801d },
	{ 0x0,0x8022,0x8022,0x8010,0x801d },
	{ 0xe,0x8025,0x2040,0x801e,0x8025 },
	{ 0x1,0x8025,0x8025,0x8023,0x204e },
	{ 0x0,0x8021,0x8075,0x8022,0x801b },
	{ 0x1,0x805f,0x8022,0x8021,0x801b },
	{ 0x0,0x8027,0x2040,0x8021,0x8005 },
	{ 0x1,0x8022,0x8015,0x8021,0x8020 },
	{ 0x0,0x8015,0x8021,0x8022,0x8020 },
	{ 0x0,0x8022,0x2040,0x8022,0x8012 },
	{ 0x0,0x8022,0x8022,0x8021,0x8014 },
	{ 0x1,0x8021,0x8016,0x8022,0x800c },
	{ 0x0,0x8016,0x8022,0x8021,0x800c },
	{ 0x1,0x8021,0x2040,0x8021,0x8011 },
	{ 0x0,0x8021,0x8021,0x8022,0x8013 },
	{ 0x4,0x8021,0x2040,0x8021,0x2044 },
	{ 0x0,0x8022,0x8077,0x8021,0x801b },
	{ 0x1,0x805d,0x8021,0x8022,0x801b },
	{ 0x0,0x8027,0x8027,0x8022,0x8004 },
	{ 0x0,0x8021,0x8079,0x8022,0x801b },
	{ 0x1,0x805b,0x8022,0x8021,0x801b },
	{ 0x0,0x8027,0x8027,0x8021,0x8009 },
	{ 0x0,0x8022,0x807b,0x8021,0x801b },
	{ 0x1,0x8059,0x8021,0x8022,0x801b },
	{ 0x0,0x8027,0x8027,0x8022,0x8003 },
	{ 0x0,0x806d,0x8022,0x2040,0x2040 },
	{ 0xe,0x800d,0x800d,0x8006,0x8071 },
	{ 0x0,0x8022,0x807d,0x800d,0x801b },
	{ 0x1,0x8057,0x800d,0x8022,0x801b },
	{ 0x0,0x8028,0x2040,0x8022,0x800a },
	{ 0x0,0x8023,0x807f,0x8022,0x801b },
	{ 0x1,0x8055,0x8022,0x8023,0x801b },
	{ 0x0,0x8027,0x8027,0x8023,0x8003 },
	{ 0x0,0x8024,0x4001,0x2040,0x2040 },
	{ 0x0,0x803d,0x8024,0x2040,0x2040 },
	{ 0x0,0x8021,0x2040,0x803f,0x2054 },
	{ 0x1,0x8021,0x8021,0x8041,0x8007 },
	{ 0x1,0x8021,0x8021,0x8043,0x8007 },
	{ 0x1,0x8021,0x8021,0x8045,0x204c },
	{ 0x1,0x8021,0x8021,0x8047,0x204c },
	{ 0xe,0x801a,0x8021,0x2054,0x801a },
	{ 0x0,0x8026,0x802f,0x8021,0x2053 },
	{ 0x1,0x802d,0x8021,0x8026,0x2053 },
	{ 0xe,0x8021,0x8051,0x204d,0x8053 },
	{ 0x0,0x804f,0x8026,0x2040,0x2040 },
	{ 0x0,0x8026,0x8021,0x8026,0x204e },
	{ 0x1,0x8022,0x8026,0x800f,0x801d },
	{ 0x1,0x8022,0x8024,0x800f,0x801d },
	{ 0x1,0x8022,0x8022,0x8010,0x801d },
	{ 0x0,0x800f,0x8023,0x2040,0x2040 },
	{ 0xe,0x8026,0x2040,0x801e,0x8026 },
	{ 0x1,0x8026,0x8026,0x8024,0x204e },
	{ 0x0,0x8021,0x8081,0x8022,0x801b },
	{ 0x1,0x806b,0x8022,0x8021,0x801b },
	{ 0x0,0x8028,0x8028,0x8021,0x8005 },
	{ 0x1,0x8022,0x8017,0x8021,0x8020 },
	{ 0x0,0x8017,0x8021,0x8022,0x8020 },
	{ 0x0,0x8022,0x2040,0x8022,0x8012 },
	{ 0x0,0x8022,0x8022,0x8021,0x8014 },
	{ 0x1,0x8021,0x8018,0x8022,0x800c },
	{ 0x0,0x8018,0x8022,0x8021,0x800c },
	{ 0x1,0x8021,0x2040,0x8021,0x8011 },
	{ 0x0,0x8021,0x8021,0x8022,0x8013 },
	{ 0x4,0x8021,0x2040,0x8021,0x2044 },
	{ 0x0,0x8022,0x8083,0x8021,0x801b },
	{ 0x1,0x8069,0x8021,0x8022,0x801b },
	{ 0x0,0x8028,0x8028,0x8022,0x8004 },
	{ 0x0,0x8021,0x8085,0x8022,0x801b },
	{ 0x1,0x8067,0x8022,0x8021,0x801b },
	{ 0x0,0x8028,0x8028,0x8021,0x8009 },
	{ 0x0,0x8022,0x8087,0x8021,0x801b },
	{ 0x1,0x8065,0x8021,0x8022,0x801b },
	{ 0x0,0x8028,0x8028,0x8022,0x8003 },
	{ 0x0,0x806f,0x8022,0x2040,0x2040 },
	{ 0xe,0x800e,0x800e,0x8006,0x8073 },
	{ 0x0,0x8022,0x8089,0x800e,0x801b },
	{ 0x1,0x8063,0x800e,0x8022,0x801b },
	{ 0x0,0x8027,0x8027,0x8022,0x800a },
	{ 0x0,0x8010,0x808b,0x8022,0x801b },
	{ 0x1,0x8061,0x8022,0x8010,0x801b },
	{ 0x0,0x8028,0x8028,0x8010,0x8003 },
	{ 0xe,0x8027,0x8025,0x801f,0x8027 },
	{ 0x4,0x8000,0x2040,0x8027,0x8002 },
	{ 0xe,0x8028,0x8026,0x801f,0x8028 },
	{ 0x4,0x8001,0x2040,0x8028,0x8002 },
};

#define _GAIN		0x8002
#define _HIGH_FREQ_1	0x8011
#define _HIGH_FREQ_2	0x8013
#define _LOW_FREQ_1	0x8012
#define _LOW_FREQ_2	0x8014
#define _DIFFUSION	0x801b
#define _DECAY		0x801d
#define _EARLY_REFL	0x801e
#define _LEVEL		0x801f

#define _R_LATE_DELAY_LW	0x806d//xtr8066
#define _R_LATE_DELAY_RW	0x806f//xtr8068
#define _R_LATE_DELAY_LR	0x8071//xtr806a
#define _R_LATE_DELAY_RR	0x8073//xtr806c
